<?php if ( ! DEFINED('BASEPATH') ) die ('No direct script access allowed.');

/**
 * @author Mark Skilbeck
 * 
 * Because of the structure, when a user accesses php-project-tracker/index.php/admin,
 * they would be shown the default controller as set in the config files. To counter this,
 * we have set up a config in the routes file that, when given index.php/admin, instead loads
 * this controller.
 */

class Main extends Controller {
	
	function Main()
	{
		parent::Controller();
		
		// Load libraries / models / helpers
			$this->load->library('theme');
		// Initialise Theme and load theme.
			Theme::init();
			Theme::load_theme_type('admin');
	}
	
	function index()
	{
		$vars['area']   = 'admin';
		$vars['module'] = 'main';
		$vars['theme_type'] = Theme::$theme_type;
		$vars['theme_alias'] = Theme::$theme_alias;
		$this->load->view('loader', $vars);
	}
	
}